// 导入mock js
const Mock = require('mockjs')
// 调用Mock的方法，生成模拟的数据
const data = Mock.mock({
  'items|30': [{
    id: '@id',
    title: '@sentence(10, 20)',
    author: '@cname',
    city: '@city',
    address: '@city(true)',
    date: '@date(yyyy-MM-dd  HH:mm:ss)'
  }]
})
// 定义接口路由
module.exports = [
  {
    url: '/tourTable/list',
    type: 'get',
    response: config => {
      const items = data.items
      return {
        code: 20000,
        data: {
          total: items.length,
          items: items
        }
      }
    }
  }
]
